import 'package:get/get.dart';
import 'package:whale/helper/utils/httputils/http_man.dart';

import 'index.dart';

class HttpTestDemoController extends GetxController {
  HttpTestDemoController();

  final state = HttpTestDemoState();

  void onTest() async {
    final res = await HttpMan().get(
      'https://api-va.tiktokv.com/tiktok/user/profile/self/v1?version_code=39.3.0&language=zh-Hant&app_name=trill&app_version=39.3.0&op_region=JP&carrier_region=&residence=JP&channel=App%20Store&mcc_mnc=&tz_offset=32400&device_id=7488401871632401921&account_region=jp&sys_region=JP&aid=1180&locale=zh-Hant-TW&screen_width=750&uoo=1&openudid=784dc7efd9ab25d672c8831287553900f6bcc834&cdid=F9F3006A-69F7-47B0-9144-77019933278A&os_api=18&idfv=C49AD19B-B09E-4869-85E4-3338FDB5C142&ac=WIFI&os_version=14.6&app_language=zh-Hant&content_language=&tz_name=Asia/Tokyo&current_region=JP&device_platform=iphone&build_number=393019&device_type=iPhone9,1&iid=7488403441590437649&scene_id=101&profile_optimize_exp=0&exp_diff=15',
    );
    Get.log(res.data.toString());
  }

  /// 在 widget 内存中分配后立即调用。
  @override
  void onInit() {
    super.onInit();
  }

  /// 在 onInit() 之后调用 1 帧。这是进入的理想场所
  @override
  void onReady() {
    super.onReady();
  }

  /// 在 [onDelete] 方法之前调用。
  @override
  void onClose() {
    super.onClose();
  }

  /// dispose 释放内存
  @override
  void dispose() {
    super.dispose();
  }
}
